(0) Obligation:

Clauses:

tree(nil).
tree(node(L, X, R)) :- ','(tree(L), tree(R)).
s2t(s(X), node(T, Y, T)) :- s2t(X, T).
s2t(s(X), node(nil, Y, T)) :- s2t(X, T).
s2t(s(X), node(T, Y, nil)) :- s2t(X, T).
s2t(s(X), node(nil, Y, nil)).
s2t(0, nil).
goal(X) :- ','(s2t(X, T), tree(T)).

Query: goal(g)

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph ICLP10.

(2) Obligation:

Clauses:

s2tA(s(T16), node(X62, X63, X62)) :- s2tA(T16, X62).
s2tA(s(T22), node(nil, X92, X93)) :- s2tA(T22, X93).
s2tA(s(T28), node(X122, X123, nil)) :- s2tA(T28, X122).
s2tA(s(T34), node(nil, X143, nil)).
s2tA(0, nil).
treeB(nil).
treeB(node(T50, T48, T51)) :- treeB(T50).
treeB(node(T50, T48, T52)) :- ','(treeB(T50), treeB(T52)).
treeC.
goalD(s(T8)) :- s2tA(T8, X27).
goalD(s(T8)) :- ','(s2tA(T8, T39), treeB(T39)).
goalD(s(T8)) :- ','(s2tA(T8, T40), ','(treeB(T40), treeB(T40))).
goalD(s(T57)) :- s2tA(T57, X189).
goalD(s(T57)) :- ','(s2tA(T57, T59), treeB(node(nil, X188, T59))).
goalD(s(T65)) :- s2tA(T65, X223).
goalD(s(T65)) :- ','(s2tA(T65, T67), treeB(node(T67, X224, nil))).
goalD(s(T73)) :- treeC.
goalD(s(T73)) :- ','(treeC, treeC).
goalD(0) :- treeC.

Query: goalD(g)

(3) PrologToPiTRSProof (SOUND transformation)

We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes:
goalD_in: (b)
s2tA_in: (b,f)
treeB_in: (b)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

goalD_in_g(s(T8)) → U7_g(T8, s2tA_in_ga(T8, X27))
s2tA_in_ga(s(T16), node(X62, X63, X62)) → U1_ga(T16, X62, X63, s2tA_in_ga(T16, X62))
s2tA_in_ga(s(T22), node(nil, X92, X93)) → U2_ga(T22, X92, X93, s2tA_in_ga(T22, X93))
s2tA_in_ga(s(T28), node(X122, X123, nil)) → U3_ga(T28, X122, X123, s2tA_in_ga(T28, X122))
s2tA_in_ga(s(T34), node(nil, X143, nil)) → s2tA_out_ga(s(T34), node(nil, X143, nil))
s2tA_in_ga(0, nil) → s2tA_out_ga(0, nil)
U3_ga(T28, X122, X123, s2tA_out_ga(T28, X122)) → s2tA_out_ga(s(T28), node(X122, X123, nil))
U2_ga(T22, X92, X93, s2tA_out_ga(T22, X93)) → s2tA_out_ga(s(T22), node(nil, X92, X93))
U1_ga(T16, X62, X63, s2tA_out_ga(T16, X62)) → s2tA_out_ga(s(T16), node(X62, X63, X62))
U7_g(T8, s2tA_out_ga(T8, X27)) → goalD_out_g(s(T8))
goalD_in_g(s(T8)) → U8_g(T8, s2tA_in_ga(T8, T39))
U8_g(T8, s2tA_out_ga(T8, T39)) → U9_g(T8, treeB_in_g(T39))
treeB_in_g(nil) → treeB_out_g(nil)
treeB_in_g(node(T50, T48, T51)) → U4_g(T50, T48, T51, treeB_in_g(T50))
treeB_in_g(node(T50, T48, T52)) → U5_g(T50, T48, T52, treeB_in_g(T50))
U5_g(T50, T48, T52, treeB_out_g(T50)) → U6_g(T50, T48, T52, treeB_in_g(T52))
U6_g(T50, T48, T52, treeB_out_g(T52)) → treeB_out_g(node(T50, T48, T52))
U4_g(T50, T48, T51, treeB_out_g(T50)) → treeB_out_g(node(T50, T48, T51))
U9_g(T8, treeB_out_g(T39)) → goalD_out_g(s(T8))
goalD_in_g(s(T8)) → U10_g(T8, s2tA_in_ga(T8, T40))
U10_g(T8, s2tA_out_ga(T8, T40)) → U11_g(T8, T40, treeB_in_g(T40))
U11_g(T8, T40, treeB_out_g(T40)) → U12_g(T8, treeB_in_g(T40))
U12_g(T8, treeB_out_g(T40)) → goalD_out_g(s(T8))
goalD_in_g(s(T57)) → U13_g(T57, s2tA_in_ga(T57, X189))
U13_g(T57, s2tA_out_ga(T57, X189)) → goalD_out_g(s(T57))
goalD_in_g(s(T57)) → U14_g(T57, s2tA_in_ga(T57, T59))
U14_g(T57, s2tA_out_ga(T57, T59)) → U15_g(T57, treeB_in_g(node(nil, X188, T59)))
U15_g(T57, treeB_out_g(node(nil, X188, T59))) → goalD_out_g(s(T57))
goalD_in_g(s(T65)) → U16_g(T65, s2tA_in_ga(T65, X223))
U16_g(T65, s2tA_out_ga(T65, X223)) → goalD_out_g(s(T65))
goalD_in_g(s(T65)) → U17_g(T65, s2tA_in_ga(T65, T67))
U17_g(T65, s2tA_out_ga(T65, T67)) → U18_g(T65, treeB_in_g(node(T67, X224, nil)))
U18_g(T65, treeB_out_g(node(T67, X224, nil))) → goalD_out_g(s(T65))
goalD_in_g(s(T73)) → U19_g(T73, treeC_in_)
treeC_in_treeC_out_
U19_g(T73, treeC_out_) → goalD_out_g(s(T73))
U19_g(T73, treeC_out_) → U20_g(T73, treeC_in_)
U20_g(T73, treeC_out_) → goalD_out_g(s(T73))
goalD_in_g(0) → U21_g(treeC_in_)
U21_g(treeC_out_) → goalD_out_g(0)

The argument filtering Pi contains the following mapping:
goalD_in_g(x1)  =  goalD_in_g(x1)
s(x1)  =  s(x1)
U7_g(x1, x2)  =  U7_g(x2)
s2tA_in_ga(x1, x2)  =  s2tA_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
s2tA_out_ga(x1, x2)  =  s2tA_out_ga(x2)
node(x1, x2, x3)  =  node(x1, x3)
0  =  0
goalD_out_g(x1)  =  goalD_out_g
U8_g(x1, x2)  =  U8_g(x2)
U9_g(x1, x2)  =  U9_g(x2)
treeB_in_g(x1)  =  treeB_in_g(x1)
nil  =  nil
treeB_out_g(x1)  =  treeB_out_g
U4_g(x1, x2, x3, x4)  =  U4_g(x4)
U5_g(x1, x2, x3, x4)  =  U5_g(x3, x4)
U6_g(x1, x2, x3, x4)  =  U6_g(x4)
U10_g(x1, x2)  =  U10_g(x2)
U11_g(x1, x2, x3)  =  U11_g(x2, x3)
U12_g(x1, x2)  =  U12_g(x2)
U13_g(x1, x2)  =  U13_g(x2)
U14_g(x1, x2)  =  U14_g(x2)
U15_g(x1, x2)  =  U15_g(x2)
U16_g(x1, x2)  =  U16_g(x2)
U17_g(x1, x2)  =  U17_g(x2)
U18_g(x1, x2)  =  U18_g(x2)
U19_g(x1, x2)  =  U19_g(x2)
treeC_in_  =  treeC_in_
treeC_out_  =  treeC_out_
U20_g(x1, x2)  =  U20_g(x2)
U21_g(x1)  =  U21_g(x1)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

Pi-finite rewrite system:
The TRS R consists of the following rules:

goalD_in_g(s(T8)) → U7_g(T8, s2tA_in_ga(T8, X27))
s2tA_in_ga(s(T16), node(X62, X63, X62)) → U1_ga(T16, X62, X63, s2tA_in_ga(T16, X62))
s2tA_in_ga(s(T22), node(nil, X92, X93)) → U2_ga(T22, X92, X93, s2tA_in_ga(T22, X93))
s2tA_in_ga(s(T28), node(X122, X123, nil)) → U3_ga(T28, X122, X123, s2tA_in_ga(T28, X122))
s2tA_in_ga(s(T34), node(nil, X143, nil)) → s2tA_out_ga(s(T34), node(nil, X143, nil))
s2tA_in_ga(0, nil) → s2tA_out_ga(0, nil)
U3_ga(T28, X122, X123, s2tA_out_ga(T28, X122)) → s2tA_out_ga(s(T28), node(X122, X123, nil))
U2_ga(T22, X92, X93, s2tA_out_ga(T22, X93)) → s2tA_out_ga(s(T22), node(nil, X92, X93))
U1_ga(T16, X62, X63, s2tA_out_ga(T16, X62)) → s2tA_out_ga(s(T16), node(X62, X63, X62))
U7_g(T8, s2tA_out_ga(T8, X27)) → goalD_out_g(s(T8))
goalD_in_g(s(T8)) → U8_g(T8, s2tA_in_ga(T8, T39))
U8_g(T8, s2tA_out_ga(T8, T39)) → U9_g(T8, treeB_in_g(T39))
treeB_in_g(nil) → treeB_out_g(nil)
treeB_in_g(node(T50, T48, T51)) → U4_g(T50, T48, T51, treeB_in_g(T50))
treeB_in_g(node(T50, T48, T52)) → U5_g(T50, T48, T52, treeB_in_g(T50))
U5_g(T50, T48, T52, treeB_out_g(T50)) → U6_g(T50, T48, T52, treeB_in_g(T52))
U6_g(T50, T48, T52, treeB_out_g(T52)) → treeB_out_g(node(T50, T48, T52))
U4_g(T50, T48, T51, treeB_out_g(T50)) → treeB_out_g(node(T50, T48, T51))
U9_g(T8, treeB_out_g(T39)) → goalD_out_g(s(T8))
goalD_in_g(s(T8)) → U10_g(T8, s2tA_in_ga(T8, T40))
U10_g(T8, s2tA_out_ga(T8, T40)) → U11_g(T8, T40, treeB_in_g(T40))
U11_g(T8, T40, treeB_out_g(T40)) → U12_g(T8, treeB_in_g(T40))
U12_g(T8, treeB_out_g(T40)) → goalD_out_g(s(T8))
goalD_in_g(s(T57)) → U13_g(T57, s2tA_in_ga(T57, X189))
U13_g(T57, s2tA_out_ga(T57, X189)) → goalD_out_g(s(T57))
goalD_in_g(s(T57)) → U14_g(T57, s2tA_in_ga(T57, T59))
U14_g(T57, s2tA_out_ga(T57, T59)) → U15_g(T57, treeB_in_g(node(nil, X188, T59)))
U15_g(T57, treeB_out_g(node(nil, X188, T59))) → goalD_out_g(s(T57))
goalD_in_g(s(T65)) → U16_g(T65, s2tA_in_ga(T65, X223))
U16_g(T65, s2tA_out_ga(T65, X223)) → goalD_out_g(s(T65))
goalD_in_g(s(T65)) → U17_g(T65, s2tA_in_ga(T65, T67))
U17_g(T65, s2tA_out_ga(T65, T67)) → U18_g(T65, treeB_in_g(node(T67, X224, nil)))
U18_g(T65, treeB_out_g(node(T67, X224, nil))) → goalD_out_g(s(T65))
goalD_in_g(s(T73)) → U19_g(T73, treeC_in_)
treeC_in_treeC_out_
U19_g(T73, treeC_out_) → goalD_out_g(s(T73))
U19_g(T73, treeC_out_) → U20_g(T73, treeC_in_)
U20_g(T73, treeC_out_) → goalD_out_g(s(T73))
goalD_in_g(0) → U21_g(treeC_in_)
U21_g(treeC_out_) → goalD_out_g(0)

The argument filtering Pi contains the following mapping:
goalD_in_g(x1)  =  goalD_in_g(x1)
s(x1)  =  s(x1)
U7_g(x1, x2)  =  U7_g(x2)
s2tA_in_ga(x1, x2)  =  s2tA_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
s2tA_out_ga(x1, x2)  =  s2tA_out_ga(x2)
node(x1, x2, x3)  =  node(x1, x3)
0  =  0
goalD_out_g(x1)  =  goalD_out_g
U8_g(x1, x2)  =  U8_g(x2)
U9_g(x1, x2)  =  U9_g(x2)
treeB_in_g(x1)  =  treeB_in_g(x1)
nil  =  nil
treeB_out_g(x1)  =  treeB_out_g
U4_g(x1, x2, x3, x4)  =  U4_g(x4)
U5_g(x1, x2, x3, x4)  =  U5_g(x3, x4)
U6_g(x1, x2, x3, x4)  =  U6_g(x4)
U10_g(x1, x2)  =  U10_g(x2)
U11_g(x1, x2, x3)  =  U11_g(x2, x3)
U12_g(x1, x2)  =  U12_g(x2)
U13_g(x1, x2)  =  U13_g(x2)
U14_g(x1, x2)  =  U14_g(x2)
U15_g(x1, x2)  =  U15_g(x2)
U16_g(x1, x2)  =  U16_g(x2)
U17_g(x1, x2)  =  U17_g(x2)
U18_g(x1, x2)  =  U18_g(x2)
U19_g(x1, x2)  =  U19_g(x2)
treeC_in_  =  treeC_in_
treeC_out_  =  treeC_out_
U20_g(x1, x2)  =  U20_g(x2)
U21_g(x1)  =  U21_g(x1)

(5) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

GOALD_IN_G(s(T8)) → U7_G(T8, s2tA_in_ga(T8, X27))
GOALD_IN_G(s(T8)) → S2TA_IN_GA(T8, X27)
S2TA_IN_GA(s(T16), node(X62, X63, X62)) → U1_GA(T16, X62, X63, s2tA_in_ga(T16, X62))
S2TA_IN_GA(s(T16), node(X62, X63, X62)) → S2TA_IN_GA(T16, X62)
S2TA_IN_GA(s(T22), node(nil, X92, X93)) → U2_GA(T22, X92, X93, s2tA_in_ga(T22, X93))
S2TA_IN_GA(s(T22), node(nil, X92, X93)) → S2TA_IN_GA(T22, X93)
S2TA_IN_GA(s(T28), node(X122, X123, nil)) → U3_GA(T28, X122, X123, s2tA_in_ga(T28, X122))
S2TA_IN_GA(s(T28), node(X122, X123, nil)) → S2TA_IN_GA(T28, X122)
GOALD_IN_G(s(T8)) → U8_G(T8, s2tA_in_ga(T8, T39))
U8_G(T8, s2tA_out_ga(T8, T39)) → U9_G(T8, treeB_in_g(T39))
U8_G(T8, s2tA_out_ga(T8, T39)) → TREEB_IN_G(T39)
TREEB_IN_G(node(T50, T48, T51)) → U4_G(T50, T48, T51, treeB_in_g(T50))
TREEB_IN_G(node(T50, T48, T51)) → TREEB_IN_G(T50)
TREEB_IN_G(node(T50, T48, T52)) → U5_G(T50, T48, T52, treeB_in_g(T50))
U5_G(T50, T48, T52, treeB_out_g(T50)) → U6_G(T50, T48, T52, treeB_in_g(T52))
U5_G(T50, T48, T52, treeB_out_g(T50)) → TREEB_IN_G(T52)
GOALD_IN_G(s(T8)) → U10_G(T8, s2tA_in_ga(T8, T40))
U10_G(T8, s2tA_out_ga(T8, T40)) → U11_G(T8, T40, treeB_in_g(T40))
U10_G(T8, s2tA_out_ga(T8, T40)) → TREEB_IN_G(T40)
U11_G(T8, T40, treeB_out_g(T40)) → U12_G(T8, treeB_in_g(T40))
U11_G(T8, T40, treeB_out_g(T40)) → TREEB_IN_G(T40)
GOALD_IN_G(s(T57)) → U13_G(T57, s2tA_in_ga(T57, X189))
GOALD_IN_G(s(T57)) → U14_G(T57, s2tA_in_ga(T57, T59))
U14_G(T57, s2tA_out_ga(T57, T59)) → U15_G(T57, treeB_in_g(node(nil, X188, T59)))
U14_G(T57, s2tA_out_ga(T57, T59)) → TREEB_IN_G(node(nil, X188, T59))
GOALD_IN_G(s(T65)) → U16_G(T65, s2tA_in_ga(T65, X223))
GOALD_IN_G(s(T65)) → U17_G(T65, s2tA_in_ga(T65, T67))
U17_G(T65, s2tA_out_ga(T65, T67)) → U18_G(T65, treeB_in_g(node(T67, X224, nil)))
U17_G(T65, s2tA_out_ga(T65, T67)) → TREEB_IN_G(node(T67, X224, nil))
GOALD_IN_G(s(T73)) → U19_G(T73, treeC_in_)
GOALD_IN_G(s(T73)) → TREEC_IN_
U19_G(T73, treeC_out_) → U20_G(T73, treeC_in_)
U19_G(T73, treeC_out_) → TREEC_IN_
GOALD_IN_G(0) → U21_G(treeC_in_)
GOALD_IN_G(0) → TREEC_IN_

The TRS R consists of the following rules:

goalD_in_g(s(T8)) → U7_g(T8, s2tA_in_ga(T8, X27))
s2tA_in_ga(s(T16), node(X62, X63, X62)) → U1_ga(T16, X62, X63, s2tA_in_ga(T16, X62))
s2tA_in_ga(s(T22), node(nil, X92, X93)) → U2_ga(T22, X92, X93, s2tA_in_ga(T22, X93))
s2tA_in_ga(s(T28), node(X122, X123, nil)) → U3_ga(T28, X122, X123, s2tA_in_ga(T28, X122))
s2tA_in_ga(s(T34), node(nil, X143, nil)) → s2tA_out_ga(s(T34), node(nil, X143, nil))
s2tA_in_ga(0, nil) → s2tA_out_ga(0, nil)
U3_ga(T28, X122, X123, s2tA_out_ga(T28, X122)) → s2tA_out_ga(s(T28), node(X122, X123, nil))
U2_ga(T22, X92, X93, s2tA_out_ga(T22, X93)) → s2tA_out_ga(s(T22), node(nil, X92, X93))
U1_ga(T16, X62, X63, s2tA_out_ga(T16, X62)) → s2tA_out_ga(s(T16), node(X62, X63, X62))
U7_g(T8, s2tA_out_ga(T8, X27)) → goalD_out_g(s(T8))
goalD_in_g(s(T8)) → U8_g(T8, s2tA_in_ga(T8, T39))
U8_g(T8, s2tA_out_ga(T8, T39)) → U9_g(T8, treeB_in_g(T39))
treeB_in_g(nil) → treeB_out_g(nil)
treeB_in_g(node(T50, T48, T51)) → U4_g(T50, T48, T51, treeB_in_g(T50))
treeB_in_g(node(T50, T48, T52)) → U5_g(T50, T48, T52, treeB_in_g(T50))
U5_g(T50, T48, T52, treeB_out_g(T50)) → U6_g(T50, T48, T52, treeB_in_g(T52))
U6_g(T50, T48, T52, treeB_out_g(T52)) → treeB_out_g(node(T50, T48, T52))
U4_g(T50, T48, T51, treeB_out_g(T50)) → treeB_out_g(node(T50, T48, T51))
U9_g(T8, treeB_out_g(T39)) → goalD_out_g(s(T8))
goalD_in_g(s(T8)) → U10_g(T8, s2tA_in_ga(T8, T40))
U10_g(T8, s2tA_out_ga(T8, T40)) → U11_g(T8, T40, treeB_in_g(T40))
U11_g(T8, T40, treeB_out_g(T40)) → U12_g(T8, treeB_in_g(T40))
U12_g(T8, treeB_out_g(T40)) → goalD_out_g(s(T8))
goalD_in_g(s(T57)) → U13_g(T57, s2tA_in_ga(T57, X189))
U13_g(T57, s2tA_out_ga(T57, X189)) → goalD_out_g(s(T57))
goalD_in_g(s(T57)) → U14_g(T57, s2tA_in_ga(T57, T59))
U14_g(T57, s2tA_out_ga(T57, T59)) → U15_g(T57, treeB_in_g(node(nil, X188, T59)))
U15_g(T57, treeB_out_g(node(nil, X188, T59))) → goalD_out_g(s(T57))
goalD_in_g(s(T65)) → U16_g(T65, s2tA_in_ga(T65, X223))
U16_g(T65, s2tA_out_ga(T65, X223)) → goalD_out_g(s(T65))
goalD_in_g(s(T65)) → U17_g(T65, s2tA_in_ga(T65, T67))
U17_g(T65, s2tA_out_ga(T65, T67)) → U18_g(T65, treeB_in_g(node(T67, X224, nil)))
U18_g(T65, treeB_out_g(node(T67, X224, nil))) → goalD_out_g(s(T65))
goalD_in_g(s(T73)) → U19_g(T73, treeC_in_)
treeC_in_treeC_out_
U19_g(T73, treeC_out_) → goalD_out_g(s(T73))
U19_g(T73, treeC_out_) → U20_g(T73, treeC_in_)
U20_g(T73, treeC_out_) → goalD_out_g(s(T73))
goalD_in_g(0) → U21_g(treeC_in_)
U21_g(treeC_out_) → goalD_out_g(0)

The argument filtering Pi contains the following mapping:
goalD_in_g(x1)  =  goalD_in_g(x1)
s(x1)  =  s(x1)
U7_g(x1, x2)  =  U7_g(x2)
s2tA_in_ga(x1, x2)  =  s2tA_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
s2tA_out_ga(x1, x2)  =  s2tA_out_ga(x2)
node(x1, x2, x3)  =  node(x1, x3)
0  =  0
goalD_out_g(x1)  =  goalD_out_g
U8_g(x1, x2)  =  U8_g(x2)
U9_g(x1, x2)  =  U9_g(x2)
treeB_in_g(x1)  =  treeB_in_g(x1)
nil  =  nil
treeB_out_g(x1)  =  treeB_out_g
U4_g(x1, x2, x3, x4)  =  U4_g(x4)
U5_g(x1, x2, x3, x4)  =  U5_g(x3, x4)
U6_g(x1, x2, x3, x4)  =  U6_g(x4)
U10_g(x1, x2)  =  U10_g(x2)
U11_g(x1, x2, x3)  =  U11_g(x2, x3)
U12_g(x1, x2)  =  U12_g(x2)
U13_g(x1, x2)  =  U13_g(x2)
U14_g(x1, x2)  =  U14_g(x2)
U15_g(x1, x2)  =  U15_g(x2)
U16_g(x1, x2)  =  U16_g(x2)
U17_g(x1, x2)  =  U17_g(x2)
U18_g(x1, x2)  =  U18_g(x2)
U19_g(x1, x2)  =  U19_g(x2)
treeC_in_  =  treeC_in_
treeC_out_  =  treeC_out_
U20_g(x1, x2)  =  U20_g(x2)
U21_g(x1)  =  U21_g(x1)
GOALD_IN_G(x1)  =  GOALD_IN_G(x1)
U7_G(x1, x2)  =  U7_G(x2)
S2TA_IN_GA(x1, x2)  =  S2TA_IN_GA(x1)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x4)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x4)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x4)
U8_G(x1, x2)  =  U8_G(x2)
U9_G(x1, x2)  =  U9_G(x2)
TREEB_IN_G(x1)  =  TREEB_IN_G(x1)
U4_G(x1, x2, x3, x4)  =  U4_G(x4)
U5_G(x1, x2, x3, x4)  =  U5_G(x3, x4)
U6_G(x1, x2, x3, x4)  =  U6_G(x4)
U10_G(x1, x2)  =  U10_G(x2)
U11_G(x1, x2, x3)  =  U11_G(x2, x3)
U12_G(x1, x2)  =  U12_G(x2)
U13_G(x1, x2)  =  U13_G(x2)
U14_G(x1, x2)  =  U14_G(x2)
U15_G(x1, x2)  =  U15_G(x2)
U16_G(x1, x2)  =  U16_G(x2)
U17_G(x1, x2)  =  U17_G(x2)
U18_G(x1, x2)  =  U18_G(x2)
U19_G(x1, x2)  =  U19_G(x2)
TREEC_IN_  =  TREEC_IN_
U20_G(x1, x2)  =  U20_G(x2)
U21_G(x1)  =  U21_G(x1)

We have to consider all (P,R,Pi)-chains

(6) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

GOALD_IN_G(s(T8)) → U7_G(T8, s2tA_in_ga(T8, X27))
GOALD_IN_G(s(T8)) → S2TA_IN_GA(T8, X27)
S2TA_IN_GA(s(T16), node(X62, X63, X62)) → U1_GA(T16, X62, X63, s2tA_in_ga(T16, X62))
S2TA_IN_GA(s(T16), node(X62, X63, X62)) → S2TA_IN_GA(T16, X62)
S2TA_IN_GA(s(T22), node(nil, X92, X93)) → U2_GA(T22, X92, X93, s2tA_in_ga(T22, X93))
S2TA_IN_GA(s(T22), node(nil, X92, X93)) → S2TA_IN_GA(T22, X93)
S2TA_IN_GA(s(T28), node(X122, X123, nil)) → U3_GA(T28, X122, X123, s2tA_in_ga(T28, X122))
S2TA_IN_GA(s(T28), node(X122, X123, nil)) → S2TA_IN_GA(T28, X122)
GOALD_IN_G(s(T8)) → U8_G(T8, s2tA_in_ga(T8, T39))
U8_G(T8, s2tA_out_ga(T8, T39)) → U9_G(T8, treeB_in_g(T39))
U8_G(T8, s2tA_out_ga(T8, T39)) → TREEB_IN_G(T39)
TREEB_IN_G(node(T50, T48, T51)) → U4_G(T50, T48, T51, treeB_in_g(T50))
TREEB_IN_G(node(T50, T48, T51)) → TREEB_IN_G(T50)
TREEB_IN_G(node(T50, T48, T52)) → U5_G(T50, T48, T52, treeB_in_g(T50))
U5_G(T50, T48, T52, treeB_out_g(T50)) → U6_G(T50, T48, T52, treeB_in_g(T52))
U5_G(T50, T48, T52, treeB_out_g(T50)) → TREEB_IN_G(T52)
GOALD_IN_G(s(T8)) → U10_G(T8, s2tA_in_ga(T8, T40))
U10_G(T8, s2tA_out_ga(T8, T40)) → U11_G(T8, T40, treeB_in_g(T40))
U10_G(T8, s2tA_out_ga(T8, T40)) → TREEB_IN_G(T40)
U11_G(T8, T40, treeB_out_g(T40)) → U12_G(T8, treeB_in_g(T40))
U11_G(T8, T40, treeB_out_g(T40)) → TREEB_IN_G(T40)
GOALD_IN_G(s(T57)) → U13_G(T57, s2tA_in_ga(T57, X189))
GOALD_IN_G(s(T57)) → U14_G(T57, s2tA_in_ga(T57, T59))
U14_G(T57, s2tA_out_ga(T57, T59)) → U15_G(T57, treeB_in_g(node(nil, X188, T59)))
U14_G(T57, s2tA_out_ga(T57, T59)) → TREEB_IN_G(node(nil, X188, T59))
GOALD_IN_G(s(T65)) → U16_G(T65, s2tA_in_ga(T65, X223))
GOALD_IN_G(s(T65)) → U17_G(T65, s2tA_in_ga(T65, T67))
U17_G(T65, s2tA_out_ga(T65, T67)) → U18_G(T65, treeB_in_g(node(T67, X224, nil)))
U17_G(T65, s2tA_out_ga(T65, T67)) → TREEB_IN_G(node(T67, X224, nil))
GOALD_IN_G(s(T73)) → U19_G(T73, treeC_in_)
GOALD_IN_G(s(T73)) → TREEC_IN_
U19_G(T73, treeC_out_) → U20_G(T73, treeC_in_)
U19_G(T73, treeC_out_) → TREEC_IN_
GOALD_IN_G(0) → U21_G(treeC_in_)
GOALD_IN_G(0) → TREEC_IN_

The TRS R consists of the following rules:

goalD_in_g(s(T8)) → U7_g(T8, s2tA_in_ga(T8, X27))
s2tA_in_ga(s(T16), node(X62, X63, X62)) → U1_ga(T16, X62, X63, s2tA_in_ga(T16, X62))
s2tA_in_ga(s(T22), node(nil, X92, X93)) → U2_ga(T22, X92, X93, s2tA_in_ga(T22, X93))
s2tA_in_ga(s(T28), node(X122, X123, nil)) → U3_ga(T28, X122, X123, s2tA_in_ga(T28, X122))
s2tA_in_ga(s(T34), node(nil, X143, nil)) → s2tA_out_ga(s(T34), node(nil, X143, nil))
s2tA_in_ga(0, nil) → s2tA_out_ga(0, nil)
U3_ga(T28, X122, X123, s2tA_out_ga(T28, X122)) → s2tA_out_ga(s(T28), node(X122, X123, nil))
U2_ga(T22, X92, X93, s2tA_out_ga(T22, X93)) → s2tA_out_ga(s(T22), node(nil, X92, X93))
U1_ga(T16, X62, X63, s2tA_out_ga(T16, X62)) → s2tA_out_ga(s(T16), node(X62, X63, X62))
U7_g(T8, s2tA_out_ga(T8, X27)) → goalD_out_g(s(T8))
goalD_in_g(s(T8)) → U8_g(T8, s2tA_in_ga(T8, T39))
U8_g(T8, s2tA_out_ga(T8, T39)) → U9_g(T8, treeB_in_g(T39))
treeB_in_g(nil) → treeB_out_g(nil)
treeB_in_g(node(T50, T48, T51)) → U4_g(T50, T48, T51, treeB_in_g(T50))
treeB_in_g(node(T50, T48, T52)) → U5_g(T50, T48, T52, treeB_in_g(T50))
U5_g(T50, T48, T52, treeB_out_g(T50)) → U6_g(T50, T48, T52, treeB_in_g(T52))
U6_g(T50, T48, T52, treeB_out_g(T52)) → treeB_out_g(node(T50, T48, T52))
U4_g(T50, T48, T51, treeB_out_g(T50)) → treeB_out_g(node(T50, T48, T51))
U9_g(T8, treeB_out_g(T39)) → goalD_out_g(s(T8))
goalD_in_g(s(T8)) → U10_g(T8, s2tA_in_ga(T8, T40))
U10_g(T8, s2tA_out_ga(T8, T40)) → U11_g(T8, T40, treeB_in_g(T40))
U11_g(T8, T40, treeB_out_g(T40)) → U12_g(T8, treeB_in_g(T40))
U12_g(T8, treeB_out_g(T40)) → goalD_out_g(s(T8))
goalD_in_g(s(T57)) → U13_g(T57, s2tA_in_ga(T57, X189))
U13_g(T57, s2tA_out_ga(T57, X189)) → goalD_out_g(s(T57))
goalD_in_g(s(T57)) → U14_g(T57, s2tA_in_ga(T57, T59))
U14_g(T57, s2tA_out_ga(T57, T59)) → U15_g(T57, treeB_in_g(node(nil, X188, T59)))
U15_g(T57, treeB_out_g(node(nil, X188, T59))) → goalD_out_g(s(T57))
goalD_in_g(s(T65)) → U16_g(T65, s2tA_in_ga(T65, X223))
U16_g(T65, s2tA_out_ga(T65, X223)) → goalD_out_g(s(T65))
goalD_in_g(s(T65)) → U17_g(T65, s2tA_in_ga(T65, T67))
U17_g(T65, s2tA_out_ga(T65, T67)) → U18_g(T65, treeB_in_g(node(T67, X224, nil)))
U18_g(T65, treeB_out_g(node(T67, X224, nil))) → goalD_out_g(s(T65))
goalD_in_g(s(T73)) → U19_g(T73, treeC_in_)
treeC_in_treeC_out_
U19_g(T73, treeC_out_) → goalD_out_g(s(T73))
U19_g(T73, treeC_out_) → U20_g(T73, treeC_in_)
U20_g(T73, treeC_out_) → goalD_out_g(s(T73))
goalD_in_g(0) → U21_g(treeC_in_)
U21_g(treeC_out_) → goalD_out_g(0)

The argument filtering Pi contains the following mapping:
goalD_in_g(x1)  =  goalD_in_g(x1)
s(x1)  =  s(x1)
U7_g(x1, x2)  =  U7_g(x2)
s2tA_in_ga(x1, x2)  =  s2tA_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
s2tA_out_ga(x1, x2)  =  s2tA_out_ga(x2)
node(x1, x2, x3)  =  node(x1, x3)
0  =  0
goalD_out_g(x1)  =  goalD_out_g
U8_g(x1, x2)  =  U8_g(x2)
U9_g(x1, x2)  =  U9_g(x2)
treeB_in_g(x1)  =  treeB_in_g(x1)
nil  =  nil
treeB_out_g(x1)  =  treeB_out_g
U4_g(x1, x2, x3, x4)  =  U4_g(x4)
U5_g(x1, x2, x3, x4)  =  U5_g(x3, x4)
U6_g(x1, x2, x3, x4)  =  U6_g(x4)
U10_g(x1, x2)  =  U10_g(x2)
U11_g(x1, x2, x3)  =  U11_g(x2, x3)
U12_g(x1, x2)  =  U12_g(x2)
U13_g(x1, x2)  =  U13_g(x2)
U14_g(x1, x2)  =  U14_g(x2)
U15_g(x1, x2)  =  U15_g(x2)
U16_g(x1, x2)  =  U16_g(x2)
U17_g(x1, x2)  =  U17_g(x2)
U18_g(x1, x2)  =  U18_g(x2)
U19_g(x1, x2)  =  U19_g(x2)
treeC_in_  =  treeC_in_
treeC_out_  =  treeC_out_
U20_g(x1, x2)  =  U20_g(x2)
U21_g(x1)  =  U21_g(x1)
GOALD_IN_G(x1)  =  GOALD_IN_G(x1)
U7_G(x1, x2)  =  U7_G(x2)
S2TA_IN_GA(x1, x2)  =  S2TA_IN_GA(x1)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x4)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x4)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x4)
U8_G(x1, x2)  =  U8_G(x2)
U9_G(x1, x2)  =  U9_G(x2)
TREEB_IN_G(x1)  =  TREEB_IN_G(x1)
U4_G(x1, x2, x3, x4)  =  U4_G(x4)
U5_G(x1, x2, x3, x4)  =  U5_G(x3, x4)
U6_G(x1, x2, x3, x4)  =  U6_G(x4)
U10_G(x1, x2)  =  U10_G(x2)
U11_G(x1, x2, x3)  =  U11_G(x2, x3)
U12_G(x1, x2)  =  U12_G(x2)
U13_G(x1, x2)  =  U13_G(x2)
U14_G(x1, x2)  =  U14_G(x2)
U15_G(x1, x2)  =  U15_G(x2)
U16_G(x1, x2)  =  U16_G(x2)
U17_G(x1, x2)  =  U17_G(x2)
U18_G(x1, x2)  =  U18_G(x2)
U19_G(x1, x2)  =  U19_G(x2)
TREEC_IN_  =  TREEC_IN_
U20_G(x1, x2)  =  U20_G(x2)
U21_G(x1)  =  U21_G(x1)

We have to consider all (P,R,Pi)-chains

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 2 SCCs with 29 less nodes.

(8) Complex Obligation (AND)

(9) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

TREEB_IN_G(node(T50, T48, T52)) → U5_G(T50, T48, T52, treeB_in_g(T50))
U5_G(T50, T48, T52, treeB_out_g(T50)) → TREEB_IN_G(T52)
TREEB_IN_G(node(T50, T48, T51)) → TREEB_IN_G(T50)

The TRS R consists of the following rules:

goalD_in_g(s(T8)) → U7_g(T8, s2tA_in_ga(T8, X27))
s2tA_in_ga(s(T16), node(X62, X63, X62)) → U1_ga(T16, X62, X63, s2tA_in_ga(T16, X62))
s2tA_in_ga(s(T22), node(nil, X92, X93)) → U2_ga(T22, X92, X93, s2tA_in_ga(T22, X93))
s2tA_in_ga(s(T28), node(X122, X123, nil)) → U3_ga(T28, X122, X123, s2tA_in_ga(T28, X122))
s2tA_in_ga(s(T34), node(nil, X143, nil)) → s2tA_out_ga(s(T34), node(nil, X143, nil))
s2tA_in_ga(0, nil) → s2tA_out_ga(0, nil)
U3_ga(T28, X122, X123, s2tA_out_ga(T28, X122)) → s2tA_out_ga(s(T28), node(X122, X123, nil))
U2_ga(T22, X92, X93, s2tA_out_ga(T22, X93)) → s2tA_out_ga(s(T22), node(nil, X92, X93))
U1_ga(T16, X62, X63, s2tA_out_ga(T16, X62)) → s2tA_out_ga(s(T16), node(X62, X63, X62))
U7_g(T8, s2tA_out_ga(T8, X27)) → goalD_out_g(s(T8))
goalD_in_g(s(T8)) → U8_g(T8, s2tA_in_ga(T8, T39))
U8_g(T8, s2tA_out_ga(T8, T39)) → U9_g(T8, treeB_in_g(T39))
treeB_in_g(nil) → treeB_out_g(nil)
treeB_in_g(node(T50, T48, T51)) → U4_g(T50, T48, T51, treeB_in_g(T50))
treeB_in_g(node(T50, T48, T52)) → U5_g(T50, T48, T52, treeB_in_g(T50))
U5_g(T50, T48, T52, treeB_out_g(T50)) → U6_g(T50, T48, T52, treeB_in_g(T52))
U6_g(T50, T48, T52, treeB_out_g(T52)) → treeB_out_g(node(T50, T48, T52))
U4_g(T50, T48, T51, treeB_out_g(T50)) → treeB_out_g(node(T50, T48, T51))
U9_g(T8, treeB_out_g(T39)) → goalD_out_g(s(T8))
goalD_in_g(s(T8)) → U10_g(T8, s2tA_in_ga(T8, T40))
U10_g(T8, s2tA_out_ga(T8, T40)) → U11_g(T8, T40, treeB_in_g(T40))
U11_g(T8, T40, treeB_out_g(T40)) → U12_g(T8, treeB_in_g(T40))
U12_g(T8, treeB_out_g(T40)) → goalD_out_g(s(T8))
goalD_in_g(s(T57)) → U13_g(T57, s2tA_in_ga(T57, X189))
U13_g(T57, s2tA_out_ga(T57, X189)) → goalD_out_g(s(T57))
goalD_in_g(s(T57)) → U14_g(T57, s2tA_in_ga(T57, T59))
U14_g(T57, s2tA_out_ga(T57, T59)) → U15_g(T57, treeB_in_g(node(nil, X188, T59)))
U15_g(T57, treeB_out_g(node(nil, X188, T59))) → goalD_out_g(s(T57))
goalD_in_g(s(T65)) → U16_g(T65, s2tA_in_ga(T65, X223))
U16_g(T65, s2tA_out_ga(T65, X223)) → goalD_out_g(s(T65))
goalD_in_g(s(T65)) → U17_g(T65, s2tA_in_ga(T65, T67))
U17_g(T65, s2tA_out_ga(T65, T67)) → U18_g(T65, treeB_in_g(node(T67, X224, nil)))
U18_g(T65, treeB_out_g(node(T67, X224, nil))) → goalD_out_g(s(T65))
goalD_in_g(s(T73)) → U19_g(T73, treeC_in_)
treeC_in_treeC_out_
U19_g(T73, treeC_out_) → goalD_out_g(s(T73))
U19_g(T73, treeC_out_) → U20_g(T73, treeC_in_)
U20_g(T73, treeC_out_) → goalD_out_g(s(T73))
goalD_in_g(0) → U21_g(treeC_in_)
U21_g(treeC_out_) → goalD_out_g(0)

The argument filtering Pi contains the following mapping:
goalD_in_g(x1)  =  goalD_in_g(x1)
s(x1)  =  s(x1)
U7_g(x1, x2)  =  U7_g(x2)
s2tA_in_ga(x1, x2)  =  s2tA_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
s2tA_out_ga(x1, x2)  =  s2tA_out_ga(x2)
node(x1, x2, x3)  =  node(x1, x3)
0  =  0
goalD_out_g(x1)  =  goalD_out_g
U8_g(x1, x2)  =  U8_g(x2)
U9_g(x1, x2)  =  U9_g(x2)
treeB_in_g(x1)  =  treeB_in_g(x1)
nil  =  nil
treeB_out_g(x1)  =  treeB_out_g
U4_g(x1, x2, x3, x4)  =  U4_g(x4)
U5_g(x1, x2, x3, x4)  =  U5_g(x3, x4)
U6_g(x1, x2, x3, x4)  =  U6_g(x4)
U10_g(x1, x2)  =  U10_g(x2)
U11_g(x1, x2, x3)  =  U11_g(x2, x3)
U12_g(x1, x2)  =  U12_g(x2)
U13_g(x1, x2)  =  U13_g(x2)
U14_g(x1, x2)  =  U14_g(x2)
U15_g(x1, x2)  =  U15_g(x2)
U16_g(x1, x2)  =  U16_g(x2)
U17_g(x1, x2)  =  U17_g(x2)
U18_g(x1, x2)  =  U18_g(x2)
U19_g(x1, x2)  =  U19_g(x2)
treeC_in_  =  treeC_in_
treeC_out_  =  treeC_out_
U20_g(x1, x2)  =  U20_g(x2)
U21_g(x1)  =  U21_g(x1)
TREEB_IN_G(x1)  =  TREEB_IN_G(x1)
U5_G(x1, x2, x3, x4)  =  U5_G(x3, x4)

We have to consider all (P,R,Pi)-chains

(10) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(11) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

TREEB_IN_G(node(T50, T48, T52)) → U5_G(T50, T48, T52, treeB_in_g(T50))
U5_G(T50, T48, T52, treeB_out_g(T50)) → TREEB_IN_G(T52)
TREEB_IN_G(node(T50, T48, T51)) → TREEB_IN_G(T50)

The TRS R consists of the following rules:

treeB_in_g(nil) → treeB_out_g(nil)
treeB_in_g(node(T50, T48, T51)) → U4_g(T50, T48, T51, treeB_in_g(T50))
treeB_in_g(node(T50, T48, T52)) → U5_g(T50, T48, T52, treeB_in_g(T50))
U4_g(T50, T48, T51, treeB_out_g(T50)) → treeB_out_g(node(T50, T48, T51))
U5_g(T50, T48, T52, treeB_out_g(T50)) → U6_g(T50, T48, T52, treeB_in_g(T52))
U6_g(T50, T48, T52, treeB_out_g(T52)) → treeB_out_g(node(T50, T48, T52))

The argument filtering Pi contains the following mapping:
node(x1, x2, x3)  =  node(x1, x3)
treeB_in_g(x1)  =  treeB_in_g(x1)
nil  =  nil
treeB_out_g(x1)  =  treeB_out_g
U4_g(x1, x2, x3, x4)  =  U4_g(x4)
U5_g(x1, x2, x3, x4)  =  U5_g(x3, x4)
U6_g(x1, x2, x3, x4)  =  U6_g(x4)
TREEB_IN_G(x1)  =  TREEB_IN_G(x1)
U5_G(x1, x2, x3, x4)  =  U5_G(x3, x4)

We have to consider all (P,R,Pi)-chains

(12) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(13) Obligation:

Q DP problem:
The TRS P consists of the following rules:

TREEB_IN_G(node(T50, T52)) → U5_G(T52, treeB_in_g(T50))
U5_G(T52, treeB_out_g) → TREEB_IN_G(T52)
TREEB_IN_G(node(T50, T51)) → TREEB_IN_G(T50)

The TRS R consists of the following rules:

treeB_in_g(nil) → treeB_out_g
treeB_in_g(node(T50, T51)) → U4_g(treeB_in_g(T50))
treeB_in_g(node(T50, T52)) → U5_g(T52, treeB_in_g(T50))
U4_g(treeB_out_g) → treeB_out_g
U5_g(T52, treeB_out_g) → U6_g(treeB_in_g(T52))
U6_g(treeB_out_g) → treeB_out_g

The set Q consists of the following terms:

treeB_in_g(x0)
U4_g(x0)
U5_g(x0, x1)
U6_g(x0)

We have to consider all (P,Q,R)-chains.

(14) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • U5_G(T52, treeB_out_g) → TREEB_IN_G(T52)
    The graph contains the following edges 1 >= 1

  • TREEB_IN_G(node(T50, T51)) → TREEB_IN_G(T50)
    The graph contains the following edges 1 > 1

  • TREEB_IN_G(node(T50, T52)) → U5_G(T52, treeB_in_g(T50))
    The graph contains the following edges 1 > 1

(15) YES

(16) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

S2TA_IN_GA(s(T22), node(nil, X92, X93)) → S2TA_IN_GA(T22, X93)
S2TA_IN_GA(s(T16), node(X62, X63, X62)) → S2TA_IN_GA(T16, X62)
S2TA_IN_GA(s(T28), node(X122, X123, nil)) → S2TA_IN_GA(T28, X122)

The TRS R consists of the following rules:

goalD_in_g(s(T8)) → U7_g(T8, s2tA_in_ga(T8, X27))
s2tA_in_ga(s(T16), node(X62, X63, X62)) → U1_ga(T16, X62, X63, s2tA_in_ga(T16, X62))
s2tA_in_ga(s(T22), node(nil, X92, X93)) → U2_ga(T22, X92, X93, s2tA_in_ga(T22, X93))
s2tA_in_ga(s(T28), node(X122, X123, nil)) → U3_ga(T28, X122, X123, s2tA_in_ga(T28, X122))
s2tA_in_ga(s(T34), node(nil, X143, nil)) → s2tA_out_ga(s(T34), node(nil, X143, nil))
s2tA_in_ga(0, nil) → s2tA_out_ga(0, nil)
U3_ga(T28, X122, X123, s2tA_out_ga(T28, X122)) → s2tA_out_ga(s(T28), node(X122, X123, nil))
U2_ga(T22, X92, X93, s2tA_out_ga(T22, X93)) → s2tA_out_ga(s(T22), node(nil, X92, X93))
U1_ga(T16, X62, X63, s2tA_out_ga(T16, X62)) → s2tA_out_ga(s(T16), node(X62, X63, X62))
U7_g(T8, s2tA_out_ga(T8, X27)) → goalD_out_g(s(T8))
goalD_in_g(s(T8)) → U8_g(T8, s2tA_in_ga(T8, T39))
U8_g(T8, s2tA_out_ga(T8, T39)) → U9_g(T8, treeB_in_g(T39))
treeB_in_g(nil) → treeB_out_g(nil)
treeB_in_g(node(T50, T48, T51)) → U4_g(T50, T48, T51, treeB_in_g(T50))
treeB_in_g(node(T50, T48, T52)) → U5_g(T50, T48, T52, treeB_in_g(T50))
U5_g(T50, T48, T52, treeB_out_g(T50)) → U6_g(T50, T48, T52, treeB_in_g(T52))
U6_g(T50, T48, T52, treeB_out_g(T52)) → treeB_out_g(node(T50, T48, T52))
U4_g(T50, T48, T51, treeB_out_g(T50)) → treeB_out_g(node(T50, T48, T51))
U9_g(T8, treeB_out_g(T39)) → goalD_out_g(s(T8))
goalD_in_g(s(T8)) → U10_g(T8, s2tA_in_ga(T8, T40))
U10_g(T8, s2tA_out_ga(T8, T40)) → U11_g(T8, T40, treeB_in_g(T40))
U11_g(T8, T40, treeB_out_g(T40)) → U12_g(T8, treeB_in_g(T40))
U12_g(T8, treeB_out_g(T40)) → goalD_out_g(s(T8))
goalD_in_g(s(T57)) → U13_g(T57, s2tA_in_ga(T57, X189))
U13_g(T57, s2tA_out_ga(T57, X189)) → goalD_out_g(s(T57))
goalD_in_g(s(T57)) → U14_g(T57, s2tA_in_ga(T57, T59))
U14_g(T57, s2tA_out_ga(T57, T59)) → U15_g(T57, treeB_in_g(node(nil, X188, T59)))
U15_g(T57, treeB_out_g(node(nil, X188, T59))) → goalD_out_g(s(T57))
goalD_in_g(s(T65)) → U16_g(T65, s2tA_in_ga(T65, X223))
U16_g(T65, s2tA_out_ga(T65, X223)) → goalD_out_g(s(T65))
goalD_in_g(s(T65)) → U17_g(T65, s2tA_in_ga(T65, T67))
U17_g(T65, s2tA_out_ga(T65, T67)) → U18_g(T65, treeB_in_g(node(T67, X224, nil)))
U18_g(T65, treeB_out_g(node(T67, X224, nil))) → goalD_out_g(s(T65))
goalD_in_g(s(T73)) → U19_g(T73, treeC_in_)
treeC_in_treeC_out_
U19_g(T73, treeC_out_) → goalD_out_g(s(T73))
U19_g(T73, treeC_out_) → U20_g(T73, treeC_in_)
U20_g(T73, treeC_out_) → goalD_out_g(s(T73))
goalD_in_g(0) → U21_g(treeC_in_)
U21_g(treeC_out_) → goalD_out_g(0)

The argument filtering Pi contains the following mapping:
goalD_in_g(x1)  =  goalD_in_g(x1)
s(x1)  =  s(x1)
U7_g(x1, x2)  =  U7_g(x2)
s2tA_in_ga(x1, x2)  =  s2tA_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
s2tA_out_ga(x1, x2)  =  s2tA_out_ga(x2)
node(x1, x2, x3)  =  node(x1, x3)
0  =  0
goalD_out_g(x1)  =  goalD_out_g
U8_g(x1, x2)  =  U8_g(x2)
U9_g(x1, x2)  =  U9_g(x2)
treeB_in_g(x1)  =  treeB_in_g(x1)
nil  =  nil
treeB_out_g(x1)  =  treeB_out_g
U4_g(x1, x2, x3, x4)  =  U4_g(x4)
U5_g(x1, x2, x3, x4)  =  U5_g(x3, x4)
U6_g(x1, x2, x3, x4)  =  U6_g(x4)
U10_g(x1, x2)  =  U10_g(x2)
U11_g(x1, x2, x3)  =  U11_g(x2, x3)
U12_g(x1, x2)  =  U12_g(x2)
U13_g(x1, x2)  =  U13_g(x2)
U14_g(x1, x2)  =  U14_g(x2)
U15_g(x1, x2)  =  U15_g(x2)
U16_g(x1, x2)  =  U16_g(x2)
U17_g(x1, x2)  =  U17_g(x2)
U18_g(x1, x2)  =  U18_g(x2)
U19_g(x1, x2)  =  U19_g(x2)
treeC_in_  =  treeC_in_
treeC_out_  =  treeC_out_
U20_g(x1, x2)  =  U20_g(x2)
U21_g(x1)  =  U21_g(x1)
S2TA_IN_GA(x1, x2)  =  S2TA_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

(17) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(18) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

S2TA_IN_GA(s(T22), node(nil, X92, X93)) → S2TA_IN_GA(T22, X93)
S2TA_IN_GA(s(T16), node(X62, X63, X62)) → S2TA_IN_GA(T16, X62)
S2TA_IN_GA(s(T28), node(X122, X123, nil)) → S2TA_IN_GA(T28, X122)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
node(x1, x2, x3)  =  node(x1, x3)
nil  =  nil
S2TA_IN_GA(x1, x2)  =  S2TA_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

(19) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(20) Obligation:

Q DP problem:
The TRS P consists of the following rules:

S2TA_IN_GA(s(T22)) → S2TA_IN_GA(T22)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(21) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • S2TA_IN_GA(s(T22)) → S2TA_IN_GA(T22)
    The graph contains the following edges 1 > 1

(22) YES